package cn.iocoder.yudao.module.scrm.dal.mysql.schedulescustomer;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.scrm.controller.admin.schedules.vo.SchedulesCustomerPageReqVO;
import cn.iocoder.yudao.module.scrm.dal.dataobject.schedulescustomer.SchedulesCustomerDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 排期客户 Mapper
 *
 * @author admin
 */
@Mapper
public interface SchedulesCustomerMapper extends BaseMapperX<SchedulesCustomerDO> {

    default PageResult<SchedulesCustomerDO> selectPage(SchedulesCustomerPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SchedulesCustomerDO>()
                .eqIfPresent(SchedulesCustomerDO::getSchedulesId, reqVO.getSchedulesId())
                .eqIfPresent(SchedulesCustomerDO::getCustomerId, reqVO.getCustomerId())
                .orderByDesc(SchedulesCustomerDO::getId));
    }

}